From: Ray Strode Date: Fri, 31 Aug 2018 16:48:00 +0000 (-0400) Subject: objectManager: correct invalid index code in onNameVanished X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2^2~67 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=afc7925e3e03282e4dfd050bc67c36490629a5de;p=gnome-shell.git objectManager: correct invalid index code in onNameVanished The object manager tries to synthesize interface removal events if the bus name of a remote object drops off the bus. The code has a bad typo in it, though: it confuses `objectPaths` (the list of all object paths) and `objectPath` (the object currently being processed this iteration of the loop). That leads to a failure to synthesize the interface removal events, and spew in the log. This commit corrects the objectPath/objectPaths confusion. --- diff --git a/js/misc/objectManager.js b/js/misc/objectManager.js index efe669ba3..134887491 100644 --- a/js/misc/objectManager.js +++ b/js/misc/objectManager.js @@ -237,7 +237,8 @@ var ObjectManager = new Lang.Class({ _onNameVanished() { let objectPaths = Object.keys(this._objects); for (let i = 0; i < objectPaths.length; i++) { - let object = this._objects[objectPaths]; + let objectPath = objectPaths[i]; + let object = this._objects[objectPath]; let interfaceNames = Object.keys(object); for (let j = 0; i < interfaceNames.length; i++) {